import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    component: () => import('./views/home/index.vue')
  },
  {
    path: '/game/:game_name',
    component: () => import('./views/game/index.vue')
  },
  {
    path: '/',
    redirect: '/home'
  }
]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router